# coding:utf-8
from urllib import request

url = "http://httpbin.org/ip"

# res = request.urlopen(url)
# print(res.read())
# """
# b'{\n  "origin": "3.96.191.106"\n}\n'
# """

# 使用代理 https://www.kuaidaili.com/free/
dict = {
    "http": "110.87.176.34:8118"
}
handler = request.ProxyHandler(dict)
opener = request.build_opener(handler)
resp = opener.open(url)

print(resp.read())

